package com.object.oriented.exam.system3.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.object.oriented.exam.system1.entity.Result;
import com.object.oriented.exam.system3.entity.dto.SurveyRuleParam;
import com.object.oriented.exam.system3.service.AutoGenerateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/auto")
public class AutoGenerateController {

    @Autowired
    private AutoGenerateService autoGenerateService;

    @PostMapping("/generate")
    public Result autoGenerate(@RequestBody SurveyRuleParam surveyRuleParam){
        return Result.success(autoGenerateService.autoGeneratePaper(surveyRuleParam));
    }

    @GetMapping("/paper/get")
    public Result getPaper(){
        return Result.success(autoGenerateService.getList());
    }
}
